package com.example.sps.pojo.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.*;

/**
 * @ProjectName: Sps
 * @Titile: EmpDTO
 * @Author: nency
 * @Description: TODO
 */
@Data
public class EmpDTO {
    @NotBlank(message = "员工姓名不能为空")
    private String empName;
    @NotBlank(message = "手机号码不能为空")
    @Length(max = 11,min = 11,message = "手机号码长度只能为11位")
    @Pattern(regexp = "^1[3-9][0-9]{9}",message = "手机号码格式错误")
    private String phone;
    @NotBlank(message = "密码不能为空")
    @Length(max = 12,min = 6,message = "密码长度必须为({min}-{max})位")
    private String password;
    @NotNull(message = "角色编号不能为空")
    private Integer roleId;
    @NotNull(message = "员工状态不能为空")
    @Max(value = 1,message = "最大值不能超过1")
    @Min(value = 0,message = "最小值不能小于0")
    private Integer status;
    private String remark;
    private MultipartFile avatar;
}
